apparently this isn't good javascript... fixed.