removed readlink dependency