added availability logic to invt