KP's first javascript code