updating to be rails 4 compatible