added commission function