Final code version. 3 parameters --> 4 parameters.