converted most indentation to tabs, added some comments