finish expand() and add pack()