script for randomly selecting lines and randomly selected sample for tagging added