Added box and diamond checking (first draft)