upgrading and fixing tests