updated to dto methods
updated optimizations
Merge pull request #103 from Zjazure/optimize-sql

Optimize sql