Fix printing returning object and add more comment on function