def param(self,key,default=None):
        """for accessing global parameters"""
        if key in self.parameters:
            return self.parameters[key]
        return default
for accessing global parameters