Turn gutter into function