Added dynamic determination of commands