First Working Version with Sample