refactored the basic example a bit