adds exists and accompanying tests