add an introduction of nth and second function