add function: findElement in Helper.java