just use
Code:
return;
inside the function if it's to just finish