test for id to obj function