updated schema and SPs