tested testing and build routine and sub determine_action