converting to js