changes to structure based on rails4