removing header, fixing bug in functions.