implement basic number parsing