improved configuration and added tests