adding index which can be used to remove element