checking in sql stuff