moved doku, added exception handling