This could be combined with the above block.