split location function into two

PRM Pimpin...