added live preview facility