Added functions for arrays