refactor .filterBy
fix bug in .take
add .waitFor