changed method set() from private to public