def parseArguments(parser):
    """
    Parse program arguments
    Parameters:
    - parser  -- argument parser as an object of ArgumentParser
                 to add arguments
    Returns: object with program arguments
    """
    args = parser.parse_args()

    print("Parameter settings used:")
    for k,v in sorted(vars(args).items()):
        print("{}: {}".format(k,v))

    return args