indenting
moving sort
move vars inside func.
indent on g2