it would be awesome to create a common method to do this, thinking in line `138`