append to the right place