added solver from assignment 1