refactored to remove constructor