Updated main function
Merge branch 'develop'