added aliveness test, properly fixed dealing with multiple results