A General approach to analysis of three -mode data