start preparing fold function for mib/rws