added endpoints database functions