first null then functions