js stuff, need to replace elements next