updated complex example;
fixed collection helper.