add common code