alternate implementation: all tests passing for threads and userprog