Creating MyObject class