(also feels like a shareable function)