Does it make sense to move this method in utils ?