update to be the same like in java  client