working encoder, started decoder function