use attr instead of data method