added support for 2d drawing