added doku, removed unused variable