This function needs to be renamed. What does it mean to "deal" with a dynamic bean? Also, add comments explaining why we need a separate function for this.