added code to call each function