select space method needs to be within setAvailableSpace closure.