:-1: to these magic numbers but since this is old JS I'll let it slide.