added exit code (should clean that up)