Added more of implementation and displays debug images