added a draw and fixed diagonal scan