Implemented drawObject()