refactored tests to get rid of warnings