Correctly generating objects

Seems to work, even though "hardcoded" solution