removed all extra code. added config options