input cleanup