added solution to two problems