More work on ifs, should probably move over to doing some generation now