parseParam() now uses for loop