debugging

remove optional stuff
solve some bugs