change times to be second64
use parameters for timeouts instead of hardcoded values