feature: pass in timeout
feature: Improve timeout handling