add sleep and debug