got exit code part of prompt working properly