solve complex method