added helper function cp2ln