functiont to do retuits