Costimulation and endogenous MHC ligands contribute to T cell recognition