added head and tail builtin ops