fixed some language and function/procedure