improvement on js and core comunication