finished prob3