I think I made it bettter, but needs more input (based on ranges of values so need to input enough to have a safe range)