recursively print obj