rewrite the os by myself