added exists function
additional test case