Using variables more effectively