use callback function if passed in
update dependencies