Updated with work2 function