comments and shared variables for speed