changed how functions are called