updating to tone mapping algorithm