added code and updated doku