add library of scala, refactoring find element