modified type setter to use reference instead of selector