CSE-79: Updated logic