solution for PA2