javascript is hard, but it will make more sense in time
arggghh