improving and fixing tests