scala require longer timeout
refactor