Edit function done but made bad