fixing line numbers and other minor changes