Replaced the translateP implementation. This is more efficiant.