created function handle_mlt for tables that can have multiple entries