significantly simpler solution