added stdlib
fixed bugs in the code I added.