I believe @slangerx has the right idea here.  However I would rewrite this to follow DRY within Tuque.