use data method instead of attr