Cognitive mediators of ego functioning in adolescence