1. singleton to protect
2. change api for analyze