added live preview feature