hand refactor tests