port kr pipe to to libs