@Ello:
how would the code have to be changed to convert it into a two-passes-technique?

JOEY.