small typos
small changes in types and removed a for loop