finished wacky function