added prototype header and footer functions