use iterator instead of accessor (now for loops can be used as usual).

Signed-off-by: anti-freak <antifreak2011@gmail.com>