single class to deal with locale constaint