remove readlink dependency