Reflecting Matt's suggested change plus modifications