removing magic numbers from worker class