prepare statement with replaced arguments