add logistics and accessing db code