Again trying to replace the bad js with my js which works