fixes for previous solution