reorganized imports
optimized db connection