removing empty blocks