Make code a little bit shorter
Use getVal  from library to extract numerical values from input fields