Replace function take() with macro function take()