stringify input first