cleaning old function