do wav encoding as well
add some documentation