configuration method with some tricks