Would be better to have this in a companion object.