all basic rails implementation