submit and clear ffunctions