add db connection
clean-up codes.