small refactor on set availability. fix test