started working on tone mapping algorithm