fixed ana algo and added doku