added draw function