added more sql stuff