undid a few changes from last commit in order to get in a working state