finished raw. todo make doku and tests pretty