baseline from original gist
Work in progress