support for nested objects
adequate test and readme to cover all possible scenarios