some changes
lots of niceties
fix bug