refactoring
refactored and added logs
Merge branch 'develop'