turning tds to inputs