add change fragment function