updating and refactored to add header and fix layout