added performance debugging