Creating the last procedure for shooting methode