I feel like this function could be named better.