update scala implementation