removed unused variable and refactored no-argument constructor