worked out a bit more bugs, may need to test windows build