Made changes to get edit working