if-else construct in smaller scope
added top margin for header