fixed test and edge case