explained code functions.h