update common function