constant cleanup and extract method