extracted code to Jobs