function fix in sync