determine exact command to use