prototype for create function