add extra user input validation and truncation