added factory tests and monthly query test