Created function for toggling available.