added sql db stuff