make this basic block its own function