initial implementation of vinheta function and fixing brightness problem.