added append lib function for arrays