added support for empty lists and custom helpers