Use attrs to avoid boilerplates