better writing code #2