added optical detector