adds rules for lists and fixes bugs