added available() method