moved entire original gist into rough format