Implemented quickEncode