added ts generator (needs work)