attempt threading implementation
more issue fixes