refactored crud test