added trailing newine to head and foot