The size of this method is now somewhat scary