added set_object method to register vars for specific objects