add possibility to encode any type of iterable objects