Updated for current rails system