add method for converting object
a little fixes