Please make a function in shared defs so we can make this DRYer