refactor and better tests