move create state function into sprite