implemented improvement for empty lists as suggested by IOhannes http://lists.puredata.info/pipermail/pd-list/2013-02/101518.html