building merchant class and trade function