refactored test cases, cleaned up duplications