add missing constants
handle nils in lists better