function to update jail term