updated schema and some minor changes