removed timeout parameter since it's computed. minor code cleanup