added solutions for cons and prot problems