added input sanitize function