finished up business logic for merchant