refactored to orginal state

fixed jobid bug
fixed usless status update

status update is now only called when status changed