second attempt using readlink