add Set method
fix compile issues