update .ts file and formatting