functions, initial entry