added calculating of coded indexes