refactored loc package