set implementation