working on basic feature detection
working on debugging detect
fixing rect generation to work with all cases