uthread done. lock functions not completed yet. queues not implemented yet. needs some refactoring.