full test workflow completed and code a bit of code refactoring to ensure all tests pass