implements activity listener and test coverage