added init to detection