refactored render and helpers extend