modify getSleepCode