update ret instruction handling
resolve conflict and merge