moved almost all of the data from scope to the controller obj