Added atomic function, and implemented skeleton for CRT and KCD