add .attributes method on base class and prevent hash to be overwritten