added presence success and error functions and tests