added many more primitive procedures, most of the code came from bootstrap scheme