init with sample