serialize fun args correctly