How to create this type of object