changing to javascript