solve two problem