add rake task
pull code from rails models out