simplifying js