implemented methods for object literals