added availableNumber api and initial tests