We should probably refactor this method to be less brittle in the future