return both attribute and data