working trial test plus multifunction source code refinement