example 01: improve the code