changed get available spaces to return a list, not a string