merged two js scripts