initial version from Christian Brassat