fixing bloc code