made js env aware