complete description of functions and cleanup