add new code, modify photodiode response