refactored and removed implicit