Complet rewrite,in the beginning!