added some graphics routines