combined the usable stuff from my blog 1 challenge with a cleaner approach