Refactored a bit ..