removed whitespace at end of lines
added credit