finish myfunction