added check for number length