work better with globals