latest verion reworked out