refactors and changes tests