seperate to model and controller module
refactor test