added typing rules