update common method. less code, more logical