more sql stuff working