hack up to work with js