tests list and code refactor