refactored widgets for easier widget creation