bugfix + exists functions