refactor entity grammar also to sewing form