obj creation before return

fix #2