set NULL on next element
bugfix
pad null by memset
implement filter
extract function in_array
garbage
DRY printf
refactor:simplify
improve usage