renaming functions, replacing c-style