working around the trainwreck known as javascript...