nested classes + templates