more robust parsing for parameters