split into templates
refactor code in to widgets