refactor Legisbody class