moving over to activerecord