modified fMax to Integer from String