created new method define in class mix to handle attribute definition instead of under init