working on image drawing functions