improve implementation of configuration method