Added some DB functions