scan left right implemented