refactored a little #4