These are similar to lines 16-17, prehaps it's worth extracting?