Finished implementation of canDispense function #32