working on type controller