database first attempt