add footer, more bug fixes