return positions array to reduce duplication