added solution for 3