updated and fixed test