removed irrelevant javascript function