Updated program with jquery