Convert to a non-callback style