refactored and split examples