added and refactored tests