refactor creating side widget