refactor tests and implement spare test implementation