reverted all changes from last two commits, and made a few minor adjustments to get things running again