remove code from functions, modify header