new functions for objectdetection