Added trace code