fixed typos and function types