brushing up on javascript