moved update definition to increment function, ditched is_null() part and