added function to check if char is number