fixed algorithm for 11 level