update dir and reference