refactored test methods