fisrt working version
correction ip