added db realted stuff