cleaned up test of some duplicate code