could someone check what's wrong with this code? input examples which give incorrect output will be enough :)