added factory and updating controller spec
updated model and controller tests