added devices table, use aysnc to handle async requests.