Added debug and input