changed schema and added new APIs