finish out scanner (still needs some fixes)