Changed take and drop function to use push.