sql tables and functions added