changed variable availibilityAPI to availibilityApi to match with nameavailabilitycheck.js