moved remaining data from views to controllers