refactoring db into its own file
refactoring lub op into its own file