more efficient unit template selection