write exram with sample test