moved data into controller