character cross - alternative ruby approach
golfed second ruby approach