add refinements for append, head, last, tail, init, and length