Refactor pass on test implementation