making functions of common tasks