refactored test a bit