defining and calling functions