modified my first javascript sample template