Added new params and some code lines