Trying to implement the basic sale function