fleshed out most of the implementation, it's now only missing a lockless queue