replace return with exit