update the take function with better variable