replace ? only in the correct context, resolves issue #13

resolves #13, checks that all the parameters are provided