add takePict API function