changed pattern input to immediate path