compatible for different platform

#8 can also change into this style. works well.