Change the logic of grabbing code