Modified function 1