started converting to rails 4