Adding demotion logic