Preview functionality added