nice refactoring, thanks alex