starting to add typescript functions