Revert "broken implementation of preview"

This reverts commit 128ba6b84c47cfa4ef9cb6e81e28b17d07fdbccc.