refactor take.s