fixed code on adding new cases