better order of detachment in mappers