clean up proc fn