refactored, fixed devise migration issue