implemented a few basic drawing functions