with determination of ambient light