refactored project into modules & added example