Added inner CRT code