refactored factories and correction of tests