append function works