condensed main and wrkb scripts into one main