modified create_attrs