the previous solution didn't work