refactor of test class for more clarity