Rewrite Set() function.