made config static
more refactoring