handleEdit controller logic composed