okay this works a lot faster better, needs a lot of documentation and refactoring but it looks like it will do the job. Will run tests Friday on the plane