removed unnecessary characters from end of file