refactor; disable locale warnings