set method improved by adding kwargs