added support for appending head