removed some bugs from previous commit just to make a working version