Added boolean variable to control SQL function