Rewrite project

rewrite code to my style