crummy solution to 7