Added happy discont logic