nearly complete with migration to rails