fixed: passes all testcases