Edit function up to date