implement append