result insertion is now working for lists and non-lists