Started to implement detection algorithms