fix PEP8
[FIX] Rewrite for better performance