add client-side prepare