added alternative solution for prob2