cleaned up formatting, removed redundant extra parameter; better comments