added fullKSimproved function