Improve & refactor example