add method to extract number to improve comparison