able to convert object to dictionary and vice versa