-added availability checking
-some bugfixes