fix bugs and add some @ helpfully functions.