working version 4 : all working .( Dirty code)