Implemented work function with many params
change to right function lab1