removed unnecessary exit call at the end