updated to pass msgs into end page