removed superflous exit(), and updated comments to be more reasonable