add rails checking