Added solution for 2a
added solution for 2a