Adding edited function