modified: constructor, try to get objects from json data