make code more modulare
Merge branch 'ayyoob'