improve getId for support current id in any position of ids array which return by getId function