added existsas statements to reproduce old behavior