Solving With A Function