make sure that the units for input are consistent