cleaned up prob3