improved parsing of commands with parameters