adding line numbers and improving whitespaces