add function to leave pin table