global variables avoided.properly indented