Implemented draw and draw frame functions