moded drawObject to handle children