implemented 'preview' controller partially
added some docstrings for methods