encode implementation - use uint8_t
forgot to rename convolve here
test program