read attribute correctly