update 2

general debugging, light threshold test added