added some extra JavaScript