added tests, some errors in factorygirl