working on initial model and functions