latest fixes to make even more generic!