refactor end status form