deletion, better schema and error handling