add some code (needs documentation)