added trim for input stuff