code fragment function