Using function handles to avoid creating more files