now also storing selected attributes