working basic code with sample array