move create function outside of object definition