adjusted function names and syntax