added tests and fixed list sorting
fixed test dependencies