edited typo errors / function error