fixed function parameter parsing. added param parsing tests