added utility functions to draw.