changed implementation of global settings

check indention