fix reservation, finding next
fix recording
add encode