Submitted code with testing cases, everything works