added primitives and bitmap_draw functions