added schema
fixed bug