various fixes and new implementations