added code combat solution