added footer and fixed validation