modified the take function a lot