updated solver function ~zk