append function working