Developing a new family of Newton–Secant method with memory based on a weight function