requested attributes parameter now honored, fixed attribute retrieval function