blah
blah
moved some stuff from controller to model.