get availablity data out of the database