more modifications on param class, use template for reading input, instead of having functions for each type