added init.sql and test functions