remove separate vectorize and tf functions; move to init instead