refactored preview layer and added label and snapshot