working sort
LexBFS not working