fixed header error, renamed a function