fix safe guard style, change namespace to toft