adding find sub logic