added new, simpler solution