added rolling support
Refactored template