refactored and added named properties