lots of changes! sorry
cleanup old code and comment more