add oncreate hook to create base attrs