added buffer for depth images. nice refactoring.