Added global to keep global parameters.