Added Digit parsing
Added more logic