cleaned for new rails based backend