adding conditionals for some test cases