fixed db package name
created Factory class