analysis script for the kaon (not working yet) and improved functionality in cf