working basic implementation without SD i/o