add method to detect period for double
added functionality to handle decimal points while in handle_number state