bug fixes; added header,footer