solve two problems