added availability functionality