refactored automated testing to be slightly simpler