optimize work routine