async encoding