fixed import order (PEP)
fixed index problem