added some global parameter handling