javascript homework, not of value to most of the world