My code above already does that (and more) but working code that can be trimmed down or added to depending on your needs.