adding final solution as of friday