stupid and tired is a bad combination when working with javascript