updated refactored implemeneted or function right