utils: reinstated the 'flatten' method :-)