stuff went wacky, this version sort of works