added user input sanitation