added remain time api.