various refactoring
added global