fix footer,  refactor