refactored test base