Split Enterprise & Location Function into two function