fixed object orientation

detection of several objects at the same time
we need to re-write this loop together