UPDATE: transformed JS to TS