test and refactor job class