use 'exit()' instead of 'end()', trim unnecessary whitespace