Made changes to the positionKey creation to reduce code and meet line length req