I wonder if we need this elsewhere and should have a utils method for this?