Changed the code for the checking of availability to one method so that all we need to do is make one simple change to one method.