optimized for faster running
Fixed some log spelling mistakes
changed variable name